package com.key.oa.http;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

import com.key.oa.util.Util;

public class HttpLogin {
	
	public static String post( String uri ) {
		
	    // Post参数  
	    List<NameValuePair> params = new ArrayList<NameValuePair>();  
	    params.add(new BasicNameValuePair("username",Util.userdata.aesUsername()));  
	    params.add(new BasicNameValuePair("password",Util.userdata.aesPassword()));
	    return HttpUtil.put(uri, params);
	}
	
	public static String get( String uri ) {
		
		String url = uri;
		url += "&username=" + Util.userdata.getUsername() 
			+ "&password=" + Util.userdata.aesPassword();
		return url;
	}
}
